package com.itbaizhan.openhis.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itbaizhan.openhis.api.domain.User;
import com.itbaizhan.openhis.domain.dto.UserDto;
import com.itbaizhan.openhis.vo.DataGridView;

import java.util.List;

/**
* @author a
* @description 针对表【sys_user(用户信息表)】的数据库操作Service
*/
public interface UserService extends IService<User> {


    DataGridView listUserForPage(UserDto userDto);

    int addUser(UserDto userDto);

    int updateUser(UserDto userDto);

    int deleteUserByIds(Long[] userIds);

    void resetPassword(Long[] userIds);

    List<User> queryUsersNeedScheduling(Long userId,Long deptId);

    /**
     * 查询所有可用的用户
     * @return
     */
    List<User> getAllUsers();

    /**
     * 根据用户ID查询用户
     *
     * @param userId 用户编号
     * @return
     */
    User getOne(Long userId);

    /**
     * 根据科室id查询用户
     * @param deptId
     * @return
     */
    List<User> getUserByDeptId(Long deptId);

    /**
     * 根据用户id和科室id查询用户
     * @param userId
     * @param deptId
     * @return
     */
    List<User> queryUsersNeedScheduling(long userId,Long deptId);

    User getUserInfo(String username);


}
